package com.foreknow.dao;

import com.foreknow.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    @Select("select * from user where username=#{username} and password=#{password}")
    User login(String username,String password);

    int removeUser(User user);

    //根据条件查询用户
    List<User> selectBySS(User user);

    //所有用户查询
    List<User> listUser();
}